package sk.marek.barak.client.util;

import sk.marek.barak.data.InvalidDataException;

public class ValidateData {
	public static void checkAnnoucementDocNumber(String numb)throws InvalidDataException{
		if (numb.length()<5 || numb.length()>8)
			throw new InvalidDataException("Invalid annoucement document number");
	}
	public static void chceckValues(Integer amounth, Integer time, String item) throws InvalidDataException{
		if((amounth.equals(0)&&!time.equals(0))||(!amounth.equals(0)&&time.equals(0)))
			throw new InvalidDataException("Invalid "+ item +" time");
	}

}
